has_ticket = True

knife_length = 50

if has_ticket:
    print("车票检查通过，请过安检")
    if knife_length > 30:
        print("刀太长了")
else:
    print("请先买票")